#导包
from selenium import webdriver
import time
from selenium.webdriver.common.by import By
#打开chome 打开sogou首页


driver=webdriver.Chrome()
driver.get('https://www.sogou.com/')
#找到搜索框,文本框输入
add =driver.find_element(By.ID,"query")
add.send_keys('天气预报')
su= driver.find_element(By.ID,"stb").click()
time.sleep(3)
print(driver.title)
if '天气预报' in driver.title:
    print('找到了')
else:
    print('没有找到')
#退出浏览器
time.sleep(3)
driver.quit()
